package com.hmy.uaa.bo.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
@ApiModel(value = "用户信息入参", description = "用户信息入参")
public class UserRequest {

    @ApiModelProperty(value = "id")
    @NotNull(groups = UserRequest.Update.class)
    private Long id;

    @NotEmpty
    @Size(max = 32)
    @ApiModelProperty(value = "姓名", required = true)
    private String name;

    @Size(max = 16)
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @NotEmpty
    @Size(max = 11)
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;

    @Size(max = 64)
    @ApiModelProperty(value = "email", required = true)
    private String email;


    @ApiModelProperty(value = "部门Id")
    private Long departmentId;

    @ApiModelProperty(value = "角色Id")
    private Long roleId;

    @ApiModelProperty(value = "性别  1:男；2：女", allowableValues = "range[1,2]", example = "1")
    @Min(1)
    @Max(2)
    private Integer sex;

    @ApiModelProperty(value = "短信  1:不推送短信；2：推送短信", allowableValues = "range[1,2]", example = "1")
    @Min(1)
    @Max(2)
    private Integer sms;

    public interface Insert {

    }

    public interface Update {

    }
}
